var orm = require('orm');

orm.connect('sqlite://db.sqlite3', function(err, db) {
	var wenzhang=db.define("wenzhang", {
        "title" :String,
        "content": { type: "text", size: 3000 }, 
        "pub_date": Date,
        "update_time" :Date, 
        "author_id": String,
        "biaoqian_table":String,
        "fenlei_id": String,
        "bigfenlei":String,
    });



    db.sync(function(err) {
      if (err){
         console.log(err);
     }
     wenzhang.create({ 
      "title" :"css学习",
      "content":"布局  清除浮动", 
      "pub_date": "2012-9-9",
      "update_time" :"2012-9-9",
      "author_id": 1, 
      "biaoqian_table":1,
      "fenlei_id": "1", 
      "bigfenlei":1,}, function(err) {
          if (err) throw err;
          wenzhang.find(function (err, wz) {
             console.log("wenzhang found: %d", wz[0].update_time);
         })
      });
   

 });
});